package com.xq.config;

import org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author xq
 * @version 1.0
 * @date 2021/4/17 18:21
 * @description 配置服务器
 */
@Configuration
public class ServerConfig {
    /**
     * 创建Jetty Servlet Web服务器工厂
     * @return
     */
    @Bean
    public ConfigurableServletWebServerFactory webServerFactory() {
        JettyServletWebServerFactory factory = new JettyServletWebServerFactory();
        return factory;
    }
}
